def func(n):
    sum=0
    for i in xrange(n):
        sum += (10**i)*(n-i)
    return sum
    
print func(400000)